package com.fsnbigdata.service.api;
import com.fsnbigdata.domain.Vegetation;
import com.fsnbigdata.domain.dto.NamingPair;
import com.querydsl.core.types.Predicate;
import org.springframework.roo.addon.layers.service.annotations.RooService;
import com.fsnbigdata.domain.ListQuadrat;
import io.springlets.data.domain.GlobalSearch;
import io.springlets.format.EntityResolver;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * = VegetationService
 *
 * TODO Auto-generated class documentation
 *
 */
@RooService(entity = Vegetation.class)
public interface VegetationService extends EntityResolver<Vegetation, Long> {

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Vegetation
     */
    public abstract Vegetation findOne(Long id);

    /**
     * TODO Auto-generated method documentation
     *
     * @param vegetation
     */
    public abstract void delete(Vegetation vegetation);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entities
     * @return List
     */
    public abstract List<Vegetation> save(Iterable<Vegetation> entities);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     */
    public abstract void delete(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entity
     * @return Vegetation
     */
    public abstract Vegetation save(Vegetation entity);

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return Vegetation
     */
    public abstract Vegetation findOneForUpdate(Long id);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @return List
     */
    public abstract List<Vegetation> findAll(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @return List
     */
    public abstract List<Vegetation> findAll();

    /**
     * TODO Auto-generated method documentation
     *
     * @return Long
     */
    public abstract long count();

    /**
     * TODO Auto-generated method documentation
     *
     * @param predicate
     * @param pageable
     * @return Page
     */
    public abstract Page<Vegetation> search(Predicate predicate, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Vegetation> findAll(GlobalSearch globalSearch, Pageable pageable, String creator);

    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Vegetation> findAll(GlobalSearch globalSearch, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<Vegetation> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param vegetation
     * @param listQuadratToAdd
     * @return Vegetation
     */
    public abstract Vegetation addToListQuadrat(Vegetation vegetation, Iterable<ListQuadrat> listQuadratToAdd);

    /**
     * TODO Auto-generated method documentation
     *
     * @param vegetation
     * @param listQuadratToRemove
     * @return Vegetation
     */
    public abstract Vegetation removeFromListQuadrat(Vegetation vegetation, Iterable<Long> listQuadratToRemove);

    List<NamingPair> findAllByInitial(String initial);

    List<List<Vegetation>> findAllByCategory();

    List findByPageAndSize(String catagory,String location,String name, Pageable pageable);//分页查询
}
